<?php
class Utils {
	
	public function __construct() {
	
	}
	
	/**
	 * 返回当前的时间(ms)
	 *
	 * @return Float
	 * @author weizhifeng
	 **/
	public static function getmicrotime() {
		list ( $usec, $sec ) = explode ( " ", microtime () );
		return (( float ) $usec + ( float ) $sec);
	}
	
	/**
	 * xxx_yyy转换为XxxYyy驼峰格式
	 * @param $filename 文件名
	 * @return void
	 * @author weizhifeng
	 **/
	public static function toCamel(&$filename) {
		if (false !== strpos ( $filename, '_' )) {
			$tmp_array = explode ( '_', $filename );
			$new_filename = '';
			foreach ( $tmp_array as $key => $value ) {
				$new_filename .= ucfirst ( $value );
			}
			$filename = $new_filename;
		} else {
			$filename = ucfirst ( $filename );
		}
	}

}
?>